package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.SchemeOpenRecordService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrcomponent.integration.FwCompSchemeOpenRecordClient;
import com.wicket.okrcomponent.integration.dto.ReleaseSchemeOpenRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.ReleaseSchemeOpenRecordComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrframework.integration.FwBaseBaseClient;
import com.wicket.okrframework.integration.FwBaseOrgClient;
import com.wicket.okrapp.integration.FwAppEvaThemeClient;
import com.wicket.okrcomponent.integration.dto.QueryApplexConrelListRespDto;
import com.wicket.okrcomponent.integration.dto.QueryApplexConrelListReqDto;
import com.wicket.okrframework.integration.dto.BatchQuerySpaceComRespDto;
import com.wicket.okrframework.integration.dto.BatchQuerySpaceComReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryOrgListBorderRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryOrgListBorderReqDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaThemeListRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaThemeListReqDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaTempRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaTempReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrcomponent.integration.FwCompDivineDataClient;
import com.wicket.okrcomponent.integration.dto.QueryOutputParametersDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryOutputParametersDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.RefreshSchemeOpenRecordDeductionComRespDto;
import com.wicket.okrcomponent.integration.dto.RefreshSchemeOpenRecordDeductionComReqDto;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrcomponent.integration.dto.AddApplexConrelComRespDto;
import com.wicket.okrcomponent.integration.dto.AddApplexConrelComReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComReqDto;
import com.wicket.okrapp.integration.FwAppOffStateClient;
import com.wicket.okrcomponent.integration.dto.AddTempSchemeConrelRespDto;
import com.wicket.okrcomponent.integration.dto.AddTempSchemeConrelReqDto;
import com.wicket.okrapp.integration.dto.RefreshEvaThemeCurrentBstepRespDto;
import com.wicket.okrapp.integration.dto.RefreshEvaThemeCurrentBstepReqDto;
import com.wicket.okrapp.integration.dto.RefreshEvaThemeCurrentBstepComRespDto;
import com.wicket.okrapp.integration.dto.RefreshEvaThemeCurrentBstepComReqDto;
import com.wicket.okrcomponent.integration.dto.DeleteTempSchemeConrelRespDto;
import com.wicket.okrcomponent.integration.dto.DeleteTempSchemeConrelReqDto;
import com.wicket.okrcomponent.integration.dto.AddTempSchemeConrelComRespDto;
import com.wicket.okrcomponent.integration.dto.AddTempSchemeConrelComReqDto;
import com.wicket.okrapp.integration.dto.AddEvaTempOpenRecordRespDto;
import com.wicket.okrapp.integration.dto.AddEvaTempOpenRecordReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "SchemeOpenRecord", tags = {"SchemeOpenRecord"})
@RestController
// @RequestMapping("/oms/schemeOpenRecord/")
public class SchemeOpenRecordController {

    @Autowired
    SchemeOpenRecordService schemeOpenRecordService;






    /**
   * B2-3查询应用实例配置关系列表(边界)
   * gen by moon at 11/9/2022, 1:02:19 AM
   */
    @PostMapping("/oms/schemeOpenRecord/queryApplexConrelListBorder")
    @ApiOperation(value = "B2-3查询应用实例配置关系列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryApplexConrelListBorderRespDto> queryApplexConrelListBorder(@RequestBody(required=false) @Validated BffQueryApplexConrelListBorderReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.queryApplexConrelListBorder(reqDTO));
    }



    /**
     * B2-3查询主题方案开通记录列表(边界)
     */
    @PostMapping("/oms/schemeOpenRecord/queryThemeSchemeOpenRecordListBorder")
    @ApiOperation(value = "B2-3查询主题方案开通记录列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryThemeSchemeOpenRecordListBorderRespDto> queryThemeSchemeOpenRecordListBorder(@RequestBody(required = false) @Validated BffQueryThemeSchemeOpenRecordListBorderReqDto reqDTO) {
        return OkrResult.success(schemeOpenRecordService.queryThemeSchemeOpenRecordListBorder(reqDTO));
    }
/**
   * B2-3发布方案开通记录(管理)
   * gen by moon at 8/17/2022, 7:39:41 PM
   */
    @PostMapping("/oms/mgt/schemeOpenRecord/releaseSchemeOpenRecord")
    @ApiOperation(value = "B2-3发布方案开通记录(管理)", response = OkrResult.class)
    public OkrResult<BffReleaseSchemeOpenRecordRespDto> releaseSchemeOpenRecord(@RequestBody(required=false) @Validated BffReleaseSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.releaseSchemeOpenRecord(reqDTO));
    }
/**
   * B2-3更新方案开通记录(管理)
   * gen by moon at 9/13/2022, 6:23:43 PM
   */
    @PostMapping("/oms/mgt/schemeOpenRecord/refreshSchemeOpenRecord")
    @ApiOperation(value = "B2-3更新方案开通记录(管理)", response = OkrResult.class)
    public OkrResult<BffRefreshSchemeOpenRecordRespDto> refreshSchemeOpenRecord(@RequestBody(required=false) @Validated BffRefreshSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.refreshSchemeOpenRecord(reqDTO));
    }
/**
   * B2-3新增模板方案配置关系(管理)
   * gen by moon at 10/19/2022, 6:44:40 AM
   */
    @PostMapping("/oms/mgt/schemeOpenRecord/addTempSchemeConrel")
    @ApiOperation(value = "B2-3新增模板方案配置关系(管理)", response = OkrResult.class)
    public OkrResult<BffAddTempSchemeConrelRespDto> addTempSchemeConrel(@RequestBody(required=false) @Validated BffAddTempSchemeConrelReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.addTempSchemeConrel(reqDTO));
    }
/**
   * B2-3删除模板方案配置关系(管理)
   * gen by moon at 10/14/2022, 2:16:26 PM
   */
    @PostMapping("/oms/mgt/schemeOpenRecord/deleteTempSchemeConrel")
    @ApiOperation(value = "B2-3删除模板方案配置关系(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteTempSchemeConrelRespDto> deleteTempSchemeConrel(@RequestBody(required=false) @Validated BffDeleteTempSchemeConrelReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.deleteTempSchemeConrel(reqDTO));
    }
}
